package cn.zs.supply.common.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.CaseFormat;
public class CommonUtil {	
	public static List<Map<String, Object>> toCamel(List<Map<String, Object>> list){
        List newlist = new ArrayList();
        for(Map<String, Object> map:list){
            newlist.add(formatMapKey(map));
        }
        return newlist;
    }
    public static Map formatMapKey(Map<String, Object> map){
        Map<String, Object> hashMap = new HashMap<>();
        for(Map.Entry<String, Object> entry:map.entrySet()){
            hashMap.put(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, entry.getKey()), entry.getValue());
        }
        return hashMap;
    }   
}